
  function showMbSel(){ 
	var ids=$("#userId").val();
  	$.dialog({
  		width:600,
  		height:400, 
          title: "会员列表",
          zIndex:2100,
          max: false,
          min: false,
          resize: false,
          content: 'url:bnsGroupController.do?viewmbs&ids='+ids,
          lock:true,
          ok: function(){
  	    	iframe = this.iframe.contentWindow; 
  	    	var rows = iframe.getMembers();  
  	    	var ids_arr=[],names=[],leader=[];
  	    	for(var i=0;i<rows.length;i++){
  	    		ids_arr.push(rows[i].mobile);
  	    		names.push(rows[i].userName);
  	    		leader.push(rows[i].mobile+":"+rows[i].userName)
  	    	} 
  	    	$("#userId").val(ids_arr.join(",")); 
  	    	$("#userName").val(names.join(","));
  	    	$("#groupLeaderId").val(names.join(","));
  	    	$("#groupLeader").val(names.join(","));
  	    },
          close: function(){
          }
      });
  }

//通用弹出式文件上传
function commonUpload(callback){
    $.dialog({
           content: "url:systemController.do?commonUpload",
           lock : true,
           title:"文件上传",
           zIndex:2100,
           width:700,
           height: 200,
           parent:windowapi,
           cache:false,
       ok: function(){
               var iframe = this.iframe.contentWindow;
               iframe.uploadCallback(callback);
                   return true;
       },
       cancelVal: '关闭',
       cancel: function(){
       } 
   });
}
function browseImages(inputId, Img) {// 图片管理器，可多个上传共用
		var finder = new CKFinder();
		finder.selectActionFunction = function(fileUrl, data) {//设置文件被选中时的函数 
			$("#" + Img).attr("src", fileUrl);
			$("#" + inputId).attr("value", fileUrl);
		};
		finder.resourceType = 'Images';// 指定ckfinder只为图片进行管理
		finder.selectActionData = inputId; //接收地址的input ID
		finder.removePlugins = 'help';// 移除帮助(只有英文)
		finder.defaultLanguage = 'zh-cn';
		finder.popup();
	}
function browseFiles(inputId, file) {// 文件管理器，可多个上传共用
	var finder = new CKFinder();
	finder.selectActionFunction = function(fileUrl, data) {//设置文件被选中时的函数 
		$("#" + file).attr("href", fileUrl);
		$("#" + inputId).attr("value", fileUrl);
		decode(fileUrl, file);
	};
	finder.resourceType = 'Files';// 指定ckfinder只为文件进行管理
	finder.selectActionData = inputId; //接收地址的input ID
	finder.removePlugins = 'help';// 移除帮助(只有英文)
	finder.defaultLanguage = 'zh-cn';
	finder.popup();
}
function decode(value, id) {//value传入值,id接受值
	var last = value.lastIndexOf("/");
	var filename = value.substring(last + 1, value.length);
	$("#" + id).text(decodeURIComponent(filename));
}